home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Utilities / Text Processing / Alpha / Tcl / SystemCode / alphaDefinitions.tcl < prev    next >
Encoding:
Text File  |  1999-04-20  |  26.0 KB  |  723 lines  |  [TEXT/ALFA]

  1. ## -*-Tcl-*-
  2.  # ###################################################################
  3.  #  Alpha - new Tcl folder configuration
  4.  # 
  5.  #  FILE: "alphaDefinitions.tcl"
  6.  #                                    created: 98-04-05 21.31.20 
  7.  #                                last update: 20/4/1999 {11:16:09 pm} 
  8.  #  Author: Vince Darley
  9.  #  E-mail: <darley@fas.harvard.edu>
  10.  #    mail: Division of Engineering and Applied Sciences, Harvard University
  11.  #          Oxford Street, Cambridge MA 02138, USA
  12.  #     www: <http://www.fas.harvard.edu/~darley/>
  13.  #  
  14.  # Reorganisation carried out by Vince Darley with much help from Tom 
  15.  # Fetherston, Johan Linde and suggestions from the Alpha-D mailing list.  
  16.  # Alpha is shareware; please register with the author using the register 
  17.  # button in the about box.
  18.  #  
  19.  # ###################################################################
  20.  ##
  21.  
  22. proc alpha::getDefinitions {} {}
  23.  
  24. namespace eval flag {}
  25. namespace eval global {}
  26.  
  27. ensureset tclvars {}
  28. ensureset allFlags {}
  29. ensureset allVars {}
  30. set invisibleModeVars(wordWrap) 1
  31.  
  32. proc flag::options {v} {
  33.     global flag::list
  34.     set thelist [set flag::list($v)]
  35.     set litems [lindex $thelist 1]
  36.     switch -- [lindex $thelist 0] {
  37.     "varitem" {
  38.         return [uplevel \#0 "set $litems"]
  39.     }
  40.     "varindex" {
  41.         return [uplevel \#0 "set $litems"]
  42.     }
  43.     "array" {
  44.         global $litems
  45.         return [lsort [array names $litems]]
  46.     }
  47.     }
  48.     return $litems
  49. }
  50.  
  51. # To fix the position of the status bar, click this box.||To allow dragging
  52. # of the status bar (usually at the bottom of the screen), click this box.
  53. newPref linkflag lockStatus 1
  54. # To scroll the horizontal scrollbar automatically to follow your typing, 
  55. # click this box||To enforce manual use of the horizontal scroll bar,
  56. # click this box.
  57. newPref linkflag autoHScroll 1
  58. # To save files automatically (except untitled buffers) every 'changesLim' 
  59. # changes, click this box||To disable the automatic saving of files, click
  60. # this box.
  61. newPref linkflag autoSave 0
  62. # To make the cursor blink, click this box||To stop the cursor blinking, 
  63. # click this box
  64. newPref linkflag blinkingCursor 1
  65. # To use a solid rectangular cursor, click this box||To use a thin vertical 
  66. # cursor, click this box.
  67. newPref linkflag blockCursor 0
  68. # To color words according to mode and context, click this box||To display all 
  69. # text more quickly, but in plain black and white, click this box.
  70. newPref linkflag coloring 1
  71. # To enable drag and drop editing using the mouse, click this box||To disable 
  72. # drag and drop editing using the mouse, click this box.
  73. newPref linkflag dragAndDrop 1
  74. # To display a horizontal scrollbar in new windows, click this box||To make 
  75. # maximum use of window space and not use a horizontal scrollbar, click this box.
  76. newPref linkflag horScrollBar 1
  77. # To enable clicking on hypertext items, click this box||To disable clicking
  78. # on hypertext items, click this box
  79. newPref linkflag hyperText 1
  80. # To force the insertion point to move with 'pageBack' and 'pageForward' 
  81. # commands, click this box||To leave the insertion point in place (usually 
  82. # offscreen) after 'pageBack' and 'pageForward' commands, click this box
  83. newPref linkflag moveInsertion 1
  84. # To list all file types (as opposed to just 'TEXT') in open/save dialog 
  85. # boxes, click this box||To display only 'TEXT' files in open/save dialog 
  86. # boxes, click this box.
  87. newPref linkflag openAllFiles 0
  88. # To make the window scroll dynamically while using vertical scrollbars, 
  89. # click this box||To make the window scroll only after releasing the button 
  90. # in a vertical scrollbar, click this box
  91. newPref linkflag powerThumb 1
  92. # Respect projector resources
  93. newPref linkflag projectorAware 1
  94. # To show all tabs, carriage returns, spaces etc with distinct symbols, 
  95. # click this box||To display whitespace characters normally, click this box.
  96. newPref linkflag showInvisibles 0
  97. # To use a small font for the various pop-up menus (e.g. marks menu), click this 
  98. # box||To use the standard system font for the popup menus, click this box.
  99. newPref linkflag smallMenuFont 1
  100. # if set, sorted is the default for function and section menus
  101. newPref linkflag sortedIsDefault
  102. # To allow tearing off of menus, click this box||To disable tearing-off of
  103. # menus, click this box
  104. newPref linkflag tearoffMenus 1
  105. # To enable Alpha's use of system temporary memory, click this box||To disallow
  106. # Alpha from using system temporary memory, click this box.
  107. newPref linkflag tempMem 1
  108. # To retain editing information to allow undo/redo operations, click this box||
  109. # To edit destructively (saving memory, and operating a little faster in, for 
  110. # example global replaces), click this box.
  111. newPref linkflag undoOn 1
  112. # To automatically insert a carriage-return when you exceed a line
  113. # length of 'fillColumn' characters, click this box||To disable automatic
  114. # text wrapping, click this box.
  115. newPref linkflag wordWrap 1
  116. # To add a description of each preference to the standard dialogs, click this 
  117. # box||To use standard preference dialogs, with a 'Help' button to display
  118. # descriptions, click this box
  119. newPref flag includeDescriptionsInDialogs 0
  120. # Used by completion routines: if there is a selection and you and
  121. # trying to complete something, and this item is set, Alpha will ask before 
  122. # deleting the selection.|| Used by completion routines: if there is a 
  123. # selection and you and trying to complete something, and this item is set, 
  124. # Alpha will ask before deleting the selection.
  125. newPref flag askDeleteSelection 0
  126. # To make a backup every time a file is saved, click this box||To save disk
  127. # space and not make backup copies when saving files, click this box.
  128. newPref flag backup 0
  129. # To force newly opened windows onto the main screen, click this box||To allow
  130. # new windows to be opened anywhere, including off screen, click this box.
  131. newPref flag forceMainScreen 1
  132. # To iconify windows when you switch to another application, click this box||
  133. # To leave windows alone when switching to other applications, click this box.
  134. newPref flag iconifyOnSwitch 0
  135. # To sort the items in the popup function menu '{}', click this box||To leave
  136. # the items in the popup function menu '{}' in the order in which they appear,
  137. # click this box.
  138. newPref flag sortFuncsMenu 1
  139. # To place two spaces after the '.' at the end of each sentence when
  140. # filling blocks of text, click this box|| To place only a single space
  141. # after the '.' at the end of each sentence when
  142. # filling blocks of text, click this box
  143. newPref flag doubleSpaces 1
  144. # To print a header at the top of each printed page, click this box||
  145. # To print only the contents of the window, without any identifying header,
  146. # click this box.
  147. newPref flag printHeader 1
  148. # To include a file's full path in the printed header, click this box
  149. # ||To place just a file's name in the printed header, click this box
  150. newPref flag printHeaderFullPath 0
  151. # To include the current time in printed headers, click this box
  152. # ||To remove the current time from printed headers, click this box
  153. newPref flag printHeaderTime 1
  154. # To choose from a listbox of possible completions if you try to 
  155. # complete a command for which no unique
  156. # suffix exists, click this box.||To abort the completion if no
  157. # unique suffix exists, click this box.
  158. newPref flag listPickIfMultCmps 1
  159. # if we have a choice between, say \left, \leftRight, \leftMore,
  160. # then we don't get stuck on '\left' with this option.
  161. newPref flag listPickIfNonUniqueStuckCmp 1
  162. # To clear old marks automatically when you select 'Mark File', 
  163. # click this box.||To check before clearing old marks, click this box.
  164. newPref flag quietlyClearMarks 1
  165. # To make Alpha beep when it asks you for something in the status bar, 
  166. # click this box.||To turn off the alert beep when using the status
  167. # bar, click this box.
  168. newPref flag promptNoisily 0
  169. # To prompt in the status bar if possible (rather than use a dialog),
  170. # click this box.||To use dialogs in preference to the status bar for
  171. # user input, click this box.
  172. newPref flag useStatusBar 1
  173. # Folder in which to store backups.  A null value tells Alpha to use
  174. # the file's current directory.
  175. newPref var backupFolder ""
  176. # Extension to add to files when backing them up
  177. newPref var backupExtension "~"
  178. # If the previous backup is more recent than this number of hours,
  179. # then don't make a new backup.  If greater than zero, this means the 
  180. # backups Alpha has tend to be significantly different to the current file.
  181. newPref var backupAgeRequirementInHours 0.0
  182. # When creating files for uploading through the Ftp menu, save them
  183. # with this eol format.  Note that some ftp clients may translate
  184. # eols for you as they up/download.
  185. newPref var createFtpType unix global "" "mac unix ibm"
  186. # Number of pixels from left edge of window to start of text
  187. newPref var horMargin 4
  188. # Alpha will visually indent code by this many characters to 
  189. # indicate its structure
  190. newPref var indentationAmount 4
  191. # If we have fewer than this many items in the opt-titlebar-menu,
  192. # add the contents of the current directory
  193. newPref var minItemsInTitlePopup 5
  194. # The tiling items in the 'Arrange' menu will relocate this many
  195. # windows, starting with the front window and moving back.
  196. newPref var numWinsToTile 2
  197. newPref var tileHeight [expr {$screenHeight - 60}]
  198. newPref var tileLeft 2
  199. newPref var tileMargin 22
  200. newPref var tileProportion .60
  201. newPref var tileTop 40
  202. newPref var tileWidth [expr {$screenWidth - 10}]
  203. newPref linkvariable defLeft 2
  204. newPref linkvariable defTop 40
  205. newPref linkvariable defHeight $tileHeight
  206. newPref linkvariable defWidth [expr {$tileWidth > 510 ? 510 : $tileWidth}]
  207. # The fraction of the screen the small batch-search, or diff-style 
  208. # windows use up.
  209. newPref var batchListWindowFraction 0.25 global win::SetProportions
  210. # The type of keyboard you have.  This influences some of the keyboard
  211. # shortcuts Alpha places in the menus, and is used for better setting
  212. # of user-defined key-bindings.
  213. newPref variable keyboard US global keys::keyboardChanged keyboards array
  214. # This dictates the spelling Alpha uses for words like 'Colour/Color'
  215. newPref var spelling 0 global "" "American British" index
  216. # Useful for debugging some complex startup problems; you can choose
  217. # between logging all errors for later viewing, or displaying them
  218. # immediately
  219. newPref var reportErrors 1 global "" \
  220.   [list "Log startup errors" "Report errors immediately"] index
  221. # re-read internet preferences from IC each startup
  222. newPref flag synchroniseWithInternetConfig 0
  223. # The font to use for printing documents
  224. newPref linkvariable printerFont "" global "" "system monaco courier geneva helvetica profont times {new york}"
  225. # The font-size to use for printing documents.
  226. newPref linkvariable printerFontSize "" global "" "7 9 10 12 14 18"
  227. # Default font to use for new windows
  228. newPref linkvariable defaultFont "monaco" global "" "system monaco courier geneva helvetica profont times {new york} programmer"
  229. # Default font size to use for new windows
  230. newPref linkvariable fontSize 9 global "" "7 9 10 12 14 18"
  231. # The amount of information to store in the resource fork of saved text
  232. # files.  This can include font, tab, selection,... information.  Here, 'think' 
  233. # implies font, tab information, and 'mpw' adds window position and window
  234. # selection.
  235. newPref linkvariable savedState "" global "" "none think mpw"
  236. # The default size for a tab character for new windows (not the same as 
  237. # the amount of space used for visual indentation of code).
  238. # Alpha can be configured to remember tab sizes for previously edited documents
  239. # -- see 'savedState' for details.
  240. newPref linkvariable tabSize 8
  241. # Regexp used for automatic word wrapping
  242. newPref linkvariable wrapBreak {[\w_]+}
  243. # Regexp used for automatic word wrapping
  244. newPref linkvariable wrapBreakPreface {([^\w_])}
  245. # Auto-wrap if the user types further than this column
  246. newPref linkvariable wrapHigh ""
  247. # Auto-un-wrap if the user deletes chars so a line is shorter than this
  248. newPref linkvariable wrapLow ""
  249. # The maximum number of changes before auto-saving occurs (if set via the 
  250. # autoSave preference)
  251. newPref linkvariable changesLim ""
  252. # When wrapping text (see 'Word Wrap' preference), wrapping occurs
  253. # for any text beyond this column position.  Used by all 'Fill' routines
  254. newPref linkvariable fillColumn 75
  255. # Set to the regular expression that ALPHA uses to find function declarations.
  256. newPref linkvariable funcExpr {^[^ \t\(#\r/@].*\(.*\)$}
  257. # The parenthesised regexp block to use for the func name
  258. newPref linkvariable funcPar 1
  259. # Number of blanks left at beginning of lines by 'fill' routines.
  260. newPref linkvariable leftFillColumn 0
  261. # Alpha asks the user if wrapping should be done whenever the user opens 
  262. # files that have lines longer than 'paraColumn' characters
  263. newPref linkvariable paraColumn 180
  264. # Text column to use as the sort key when executing 'Sort Lines'.
  265. newPref linkvariable sortColumn 0
  266. # File to use for Tag searches.
  267. newPref linkio-file tagFile [file join $HOME cTAGS]
  268. # Margin size for printing
  269. newPref linkvariable leftMargin ""
  270. # Margin size for printing
  271. newPref linkvariable bottomMargin ""
  272. # Margin size for printing
  273. newPref linkvariable topMargin ""
  274. # Regular expression used to defines words for all internal operations.  Most
  275. # modes have their own definition of this variable.
  276. newPref linkvariable wordBreak {\w+}
  277. # Prepended to 'wordBreak' when looking backwards for a word.  Most
  278. # modes have their own definition of this variable.
  279. newPref linkvariable wordBreakPreface {(\W)}
  280. # Flags that won't appear in the menu.
  281. linkVar numLock
  282. # Usual place you use for downloading updates to Alpha and its packages.
  283. newPref var defaultAlphaDownloadSite "" global "" remote::site array
  284. # bug in alpha-IC interaction
  285. if {![catch "icGetPref DownloadFolder" res] && [file exists $res]} {
  286.     # Default download location for files from the internet
  287.     newPref var downloadFolder $res
  288. } else {
  289.     newPref var downloadFolder $HOME
  290. }
  291. # if first item = code, then indent relative to code by given value of second arg
  292. # if first item = fixed, then force indentation to given level
  293. set indentationTypes [list "code 0" "code 4" "fixed 0"]
  294.  
  295. lunion flagPrefs(Backups)    backup undoOn autoSave
  296. lunion varPrefs(Backups)    backupFolder backupExtension changesLim \
  297.   backupAgeRequirementInHours
  298. lunion flagPrefs(Text)        hyperText doubleSpaces dragAndDrop    
  299. lunion varPrefs(Text)        fillColumn leftFillColumn paraColumn wrapLow \
  300.   wrapHigh sortColumn
  301. lunion flagPrefs(Appearance)    blinkingCursor blockCursor coloring \
  302.   showInvisibles smallMenuFont sortFuncsMenu tearoffMenus   \
  303.   promptNoisily includeDescriptionsInDialogs
  304. lunion varPrefs(Appearance)    defaultFont fontSize tabSize 
  305. lunion flagPrefs(Printer)    printHeader printHeaderFullPath printHeaderTime
  306. lunion varPrefs(Printer)    bottomMargin printerFont printerFontSize \
  307.   topMargin leftMargin
  308. lunion flagPrefs(Tags)        
  309. lunion varPrefs(Tags)        funcPar tagFile
  310. lunion flagPrefs(Window)    autoHScroll forceMainScreen horScrollBar \
  311.   moveInsertion powerThumb sortedIsDefault iconifyOnSwitch lockStatus \
  312.   useStatusBar
  313. lunion varPrefs(Window)        defHeight defLeft defTop defWidth \
  314.   minItemsInTitlePopup savedState
  315. lunion flagPrefs(Tiling)        
  316. lunion varPrefs(Tiling)        numWinsToTile batchListWindowFraction horMargin \
  317.   tileHeight tileProportion tileLeft tileMargin tileTop tileWidth 
  318. lunion flagPrefs(Electrics)    listPickIfMultCmps listPickIfNonUniqueStuckCmp \
  319.   askDeleteSelection
  320. lunion varPrefs(Electrics)    indentationAmount elecStopMarker
  321. lunion flagPrefs(Files) tempMem projectorAware openAllFiles
  322. lunion varPrefs(Files) 
  323. lunion "flagPrefs(Helper Applications)"
  324. lunion "varPrefs(Helper Applications)"
  325. lunion flagPrefs(WWW) synchroniseWithInternetConfig
  326. lunion varPrefs(WWW) defaultAlphaDownloadSite createFtpType downloadFolder \
  327.   browserSig ftpSig httpDownloadSig
  328. lunion flagPrefs(International)
  329. lunion varPrefs(International) keyboard spelling 
  330. lunion flagPrefs(Packages)
  331. lunion varPrefs(Packages) 
  332. lunion flagPrefs(Errors)
  333. lunion varPrefs(Errors) reportErrors
  334.  
  335. proc alpha::addToPreferencePage {page args} {
  336.     global varPrefs flagPrefs allFlags
  337.     set vars [lremove -l $args $allFlags]
  338.     set flags [lremove -l $args $vars]
  339.     eval lunion varPrefs($page) $vars
  340.     eval lunion flagPrefs($page) $flags
  341. }
  342.  
  343. namespace eval indent {}
  344.  
  345. set indent::amounts [list "nothing" "half-tab" "tab"]
  346.  
  347. proc indent::setup {args} {
  348.     global indent_amounts indentationAmount
  349.     set indent_amounts(0) 0
  350.     set indent_amounts(1) [expr {$indentationAmount/2}]
  351.     set indent_amounts(2) $indentationAmount
  352.     set indent_amounts(-1) [expr {-$indentationAmount/2}]
  353.     set indent_amounts(-2) [expr {-$indentationAmount}]
  354. }
  355. indent::setup
  356. trace variable indentationAmount w indent::setup
  357.  
  358. proc getFileSig {f} {
  359.     getFileInfo $f arr
  360.     if {[info exists arr(creator)]} {
  361.     return $arr(creator)
  362.     } else {
  363.     return ""
  364.     }
  365. }
  366.  
  367. proc getFileType {f} {
  368.     getFileInfo $f arr
  369.     if {[info exists arr(type)]} {
  370.     return $arr(type)
  371.     } else {
  372.     return "TEXT"
  373.     }
  374. }
  375.  
  376. # get defaults from internet config
  377. if {$synchroniseWithInternetConfig} {
  378.     catch {set browserSig [getFileSig [icGetPref -t 1 Helper•http]]}
  379.     catch {set ftpSig [getFileSig [icGetPref -t 1 Helper•ftp]]}
  380. } else {
  381.     catch {ensureset browserSig [getFileSig [icGetPref -t 1 Helper•http]]}
  382.     catch {ensureset ftpSig [getFileSig [icGetPref -t 1 Helper•ftp]]}
  383. }
  384.  
  385. # The application signature of your internet browser
  386. newPref v browserSig MOSS
  387. # The application signature of your ftp client
  388. newPref v ftpSig Arch
  389. # The application signature of your internet browser to use for downloading
  390. # only (rather than viewing)
  391. newPref v httpDownloadSig $browserSig
  392.  
  393. # The application signature of your stuffit expander
  394. newPref v unstuffSig SITx
  395.  
  396. namespace eval win {}
  397.  
  398. proc win::SetProportions {} {
  399.     global tileHeight tileWidth tileTop tileLeft tileHeight \
  400.       errorHeight errorDisp tileMargin batchListWindowFraction
  401.     set errorHeight [expr {int ($batchListWindowFraction * ($tileHeight - $tileMargin))}]
  402.     set errorDisp [expr {int ((1- $batchListWindowFraction) * ($tileHeight - $tileMargin))}]
  403. }
  404.  
  405. proc wordWrapProc {val} { 
  406.     global mode wordWrap modifiedArrayElements 
  407.     global ${mode}modeVars
  408.     set wordWrap $val
  409.     set ${mode}modeVars(wordWrap) $val
  410.     lappend modifiedArrayElements [list wordWrap ${mode}modeVars]
  411. }
  412.  
  413.  
  414. proc toggleNumLock {} {
  415.     global numLock modifiedVars
  416.     
  417.     set numLock [expr {1 - $numLock}]
  418.     lappend modifiedVars numLock
  419. }
  420.  
  421. #============================================================================
  422. # declare these as modeVars in advance.  I'm not sure it is necessary (Vince)
  423. lunion modeVars funcExpr wrapBreakPreface wrapBreak wordBreakPreface wordBreak
  424.  
  425. # 'mode' is nothing when we start up.
  426. set mode        {}
  427. set lastMode        0
  428. set reverting        {}
  429.  
  430. # For quithook
  431. set modifiedVars    {}
  432. set modifiedArrVars     {}
  433. set modifiedModeVars    {}
  434. set modifiedArrayElements {}
  435.  
  436. namespace eval win {}
  437. ensureset win::Active ""
  438.  
  439. # Default settings of some global parameters (not preferences settings)
  440. # These will all be over-written by user-defs if set.
  441. set resumeRevert 0
  442. set prefixString ">\ "
  443. set suffixString "\ <--"
  444. # mapping of windows to current modes.
  445. set win::Modes("") ""
  446. # keep count of number of dirty windows.
  447. set win::NumDirty 0
  448. set win::Current ""
  449. # For mark stack.
  450. set markName 0
  451. set markStack ""
  452. set winMenu "•263"
  453. set keyboard "U.S."
  454. set oldkeyboard ""
  455.  
  456. win::SetProportions
  457.  
  458. lunion ftpSigs Arch FTCh Woof
  459. lunion texSigs OTEX *TEX *XeT MPS*
  460. lunion browserSigs MOSS MSIE dogz OlG1 HTVW
  461. lunion httpDownloadSigs MOSS MSIE dogz OlG1 Geni Arch
  462. lunion tclshSigs WIsH TclL Geni
  463. lunion unstuffSigs SITx MV50
  464.  
  465. namespace eval keys {}
  466.  
  467. array set keys::specialProcs { 
  468.     "Next Stop" "ring::+"
  469.     "Next Stop Or Indent" "bind::IndentOrNextstop"
  470.     "Complete" "bind::Completion"
  471.     "Complete Or Tab" "bind::TabOrComplete"
  472.     "Prev Stop" "ring::-"
  473.     "Real Tab" "insertActualTab"
  474.     "nth Stop" "ring::nth"
  475.     "Clear All Stops" "ring::clear"
  476. }
  477.  
  478. array set keys::specialBindings {
  479.     "Complete" "<O/c"
  480.     "Prev Stop" "<U/c"
  481.     "Real Tab" "<I/c"
  482.     "nth Stop" "<B/c"
  483.     "Clear All Stops" "<U<B/c"
  484.     "Next Stop" ""
  485.     "Complete Or Tab" ""
  486.     "Next Stop Or Indent" "/c"
  487. }
  488.  
  489. # Note: the Mercutio MDEF can only handle icon-suite resources
  490. # with id's from 208 to 208+255 = 463.  Hence many of the little
  491. # icons which Alpha contains cannot appear in menus.  You could
  492. # of course do a little hacking....
  493. set alpha::_icons {
  494.     {DanR "Think Reference" 265}
  495.     {OTEX "OzTeX" 266}
  496.     {*TEX "TeXtures" 267}
  497.     {XXXX "LaTeX" 270}
  498.     {*XeT "CMacTeX" 272}
  499.     {TeX+ "DirectTeX Pro" 299}
  500.     {CWIE "Codewarrior" 268}
  501.     {dogz "Cyberdog" 281}
  502.     {Vbib "BibTeX" 282}
  503.     {SLab "Scilab" 283}
  504.     {IGR0 "Igor Pro" 284}
  505.     {JAVC "Apple Applet Viewer" 285}
  506.     {MOSS "Netscape Navigator" 293}
  507.     {MOSS "Netscape Communicator" 294}
  508.     {MSIE "Microsoft Internet Explorer" 295}
  509.     {OlG1 "MacLynx" 296}
  510.     {DanR "Think Ref Viewer" 310}
  511.     {gsVR "Ghostview" 311}
  512.     {PnLF "Finger" 313}
  513.     {RZMI "MakeIndex" 314}
  514.     {FTCh "Fetch" 315}
  515.     {TGE+ "Tarmac" 316}
  516.     {Gzip "Gzip" 317}
  517.     {DStf "DropStuff" 318}
  518.     {SITx "StuffIt Expander" 319}
  519.     {ALTV "Programmer's Assistant" 400}
  520.     {MPAD "Mupad" 411}
  521.     {GPSE "Gnuplot" 415}
  522.     {Vodo "VOODOO" 500}
  523. }
  524.  
  525. namespace eval remote {}
  526.  
  527. ensureset "remote::site(Alpha's Home)" \
  528.   "ftp://alpha.olm.net/pub/packages/"
  529. ensureset "remote::site(Alpha's Upload site)" \
  530.   "ftp://alpha.olm.net/incoming/"
  531. ensureset "remote::site(Vince's Alpha-D site)" \
  532.   "ftp://ftp.ucsd.edu/pub/alpha/"
  533.  
  534. ensureset remote::listing {}
  535.  
  536. namespace eval keyboard {}
  537.  
  538. # array set keyboard::localized {
  539. #     Svensk Swedish
  540. #     U.S. U.S.
  541. # }
  542. # # Works with MacOS 8.5, but possibly not earlier releases.
  543. # if {![catch {aebuild::result 'MACS' kybd ckyl} __keyboard] && \
  544. #   [info exist keyboard::localized($__keyboard)]} {
  545. #     set keyboard [set keyboard::localized($__keyboard)]
  546. # }
  547. # catch {unset keyboard::localized __keyboard}
  548.  
  549. set "keyboards(Australian)" {
  550.  {§1234567890-=[];'\`,./}
  551.  {±!@#$%^&*()_+{}:"|~<>?}
  552.  <U/[
  553.  <U/]
  554.  {'§' 0x0a '±' 0x0a}
  555. }
  556. set "keyboards(Brasil)" {
  557.  {§1234567890'+º´ç~\<,.-}
  558.  {±!"#$%&/()=?*ª`Ç^|>;:_}
  559.  <I<U/8
  560.  <I<U/9
  561.  {'§' 0x0a '±' 0x0a 'º' 0x21 'ª' 0x21 'ç' 0x29 'Ç' 0x29 '´' 0x1e '`' 0x1e '~' 0x27 '^' 0x27}
  562. }
  563. set "keyboards(British)" {
  564.  {§1234567890-=[];'\`,./}
  565.  {±!@£$%^&*()_+{}:"|~<>?}
  566.  <U/[
  567.  <U/]
  568.  {'§' 0x0a '±' 0x0a '£' 0x14}
  569. }
  570. set "keyboards(Canadian - CSA)" {
  571.  {/1234567890-=^ç;èàù,.é}
  572.  {\!@#$%?&*()_+¨Ç:ÈÀÙ'"É}
  573.  <I/7
  574.  <I/8
  575.  {'ç' 0x1e 'Ç' 0x1e 'è' 0x27 'È' 0x27 'à' 0x2a 'À' 0x2a 'é' 0x2c 'É' 0x2c 'ù' 0x32 'Ù' 0x32 '^' 0x21 '¨' 0x21 '7' 0x1a '8' 0x1c}
  576. }
  577. set "keyboards(Canadian - ISO)" {
  578.  {¬1234567890-=^ç;èàù,.é}
  579.  {°!"#$%?&*()_+¨Ç:ÈÀÙ'.É}
  580.  <I/7
  581.  <I/0
  582.  {'°' 0x0a '¬' 0x0a 'ç' 0x1e 'Ç' 0x1e 'è' 0x27 'È' 0x27 'à' 0x2a 'À' 0x2a 'é' 0x2c 'É' 0x2c 'ù' 0x32 'Ù' 0x32 '^' 0x21 '¨' 0x21 '7' 0x1a '0' 0x1d}
  583. }
  584. set "keyboards(Canadian - French)" {
  585.  {<1234567890-='[;`/¨,.é}
  586.  {>!@#$%?&*()_+"]:^|°<>ç}
  587.  <I/[
  588.  <I<U/[
  589.  {'é' 0x2c 'ç' 0x2c '¨' 0x06 '°' 0x06 '`' 0x27 '^' 0x27}
  590. }
  591. set "keyboards(Danish)" {
  592.  {$1234567890+´å¨æø'<,.-}
  593.  {§!"#€%&/()=?`Å^ÆØ*>;:_}
  594.  <I<U/8
  595.  <I<U/9
  596.  {'§' 0x0a '€' 0x15 'å' 0x21 'Å' 0x21 'æ' 0x29 'Æ' 0x29 'ø' 0x27 'Ø' 0x27 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  597. }
  598. set "keyboards(Dutch)" {
  599.  {§1234567890-=[];'\`,./}
  600.  {±!@#$%^&*()_+{}:"|~<>?}
  601.  <U/[
  602.  <U/]
  603.  {'§' 0x0a '±' 0x0a}
  604. }
  605. set "keyboards(Español - ISO)" {
  606.  {º1234567890'¡`+ñ´ç<,.-}
  607.  {ª!"·$%&/()=?¿^*ѨÇ>;:_}
  608.  <I/´
  609.  <I/ç
  610.  {'ç' 0x2a 'ñ' 0x29 'Ç' 0x2a 'Ñ' 0x29 '¡' 0x18 '¿' 0x18 'º' 0x0a 'ª' 0x0a '·' 0x14 '`' 0x21 '^' 0x21 '´' 0x27 '¨' 0x27}
  611. }
  612. set "keyboards(Finnish)" {
  613.  {§1234567890+´å¨öä'<,.-}
  614.  {°!"#€%&/()=?`Å^ÖÄ*>;:_}
  615.  <I<U/8
  616.  <I<U/9
  617.  {'§' 0x0a '°' 0x0a '€' 0x15 'å' 0x21 'ä' 0x27 'ö' 0x29 'Å' 0x21 'Ä' 0x27 'Ö' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  618. }
  619. set "keyboards(Flemish)" {
  620.  {@&é"'(§è!çà)-^$ù`<,;:=}
  621.  {#1234567890°_¨*%£>?./+}
  622.  <I/(
  623.  <I/)
  624.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  625. }
  626. set "keyboards(French)" {
  627.  {@&é"'(§è!çà)-^$ù`<,;:=}
  628.  {#1234567890°_¨*%£>?./+}
  629.  <I/(
  630.  <I/)
  631.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  632. }
  633. set "keyboards(French - numerical)" {
  634.  {@&é"'(§è!çà)-^$ù`<,;:=}
  635.  {#1234567890°_¨*%£>?./+}
  636.  <I/(
  637.  <I/)
  638.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  639. }
  640. set "keyboards(German)" {
  641.  {^1234567890ß´ü+öä#<,.-}
  642.  {°!"§$%&/()=?`Ü*ÖÄ^>;:_}
  643.  <I/8
  644.  <I/9
  645.  {'^' 0x0a '°' 0x0a '§' 0x14 'ü' 0x21 'ö' 0x29 'ä' 0x27 'Ü' 0x21 'Ö' 0x29 'Ä' 0x27 'ß' 0x1b '´' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  646. }
  647. set "keyboards(Italian)" {
  648.  {@&"'(çè)£àé-=ì$ù§<,;:ò}
  649.  {#1234567890_+^*%°>?./!}
  650.  <I/(
  651.  <I/)
  652.  {'(' 0x15 ')' 0x1a 'ç' 0x17 'è' 0x16 '£' 0x1c 'à' 0x19 'é' 0x1d 'ì' 0x21 'ù' 0x27 'ò' 0x2c '§' 0x2a '°' 0x2a}
  653. }
  654. set "keyboards(Norwegian)" {
  655.  {'1234567890+´å¨øæ@<,.-}
  656.  {§!"#$%&/()=?`Å^ØÆ*>;:_}
  657.  <I<U/8
  658.  <I<U/9
  659.  {'§' 0x0a 'å' 0x21 'æ' 0x27 'ø' 0x29 'Å' 0x21 'Æ' 0x27 'Ø' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  660. }
  661. set "keyboards(Spanish)" {
  662.  {[1234567890-=´`ñ;'<,.ç}
  663.  {]¡!#$%/&*()_+º¨Ñ:">¿?Ç}
  664.  <I<U/<
  665.  <U/[
  666.  {'¡' 0x12 '´' 0x21 'º' 0x21 'ñ' 0x29 'Ñ' 0x29 '¿' 0x2b 'ç' 0x2c 'Ç' 0x2c '`' 0x1e '¨' 0x1e}
  667. }
  668. set "keyboards(Swedish)" {
  669.  {§1234567890+´å¨öä'<,.-}
  670.  {°!"#€%&/()=?`Å^ÖÄ*>;:_}
  671.  <I<U/8
  672.  <I<U/9
  673.  {'§' 0x0a '°' 0x0a '€' 0x15 'å' 0x21 'Å' 0x21 'ä' 0x27 'Ä' 0x27 'ö' 0x29 'Ö' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  674. }
  675. set "keyboards(Swiss French)" {
  676.  {§1234567890'^è¨éà$<,.-}
  677.  {°+"*ç%&/()=?`ü!öä£>;:_}
  678.  <I/8
  679.  <I/9
  680.  {'§' 0x0a '°' 0x0a 'ü' 0x21 'è' 0x21 'ö' 0x29 'é' 0x29 'ä' 0x27 'à' 0x27 'ç' 0x15 '£' 0x2a '¨' 0x1e '!' 0x1e '^' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  681. }
  682. set "keyboards(Swiss German)" {
  683.  {§1234567890'^ü¨öä$<,.-}
  684.  {°+"*ç%&/()=?`è!éà£>;:_}
  685.  <I/8
  686.  <I/9
  687.  {'§' 0x0a '°' 0x0a 'ü' 0x21 'è' 0x21 'ö' 0x29 'é' 0x29 'ä' 0x27 'à' 0x27 'ç' 0x15 '£' 0x2a '¨' 0x1e '!' 0x1e '^' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  688. }
  689. set "keyboards(U.S.)" {
  690.  {§1234567890-=[];'\`,./}
  691.  {±!@#$%^&*()_+{}:"|~<>?}
  692.  <U/[
  693.  <U/]
  694.  {'§' 0x0a '±' 0x0a}
  695. }
  696.  
  697. set "keyboards(Slovenian)" {
  698.   {“1234567890/+πËÊæ<,.-}
  699.   {”!"#$%&'()=?*©–»ΔÆ>;:_}
  700.   <U<I/π
  701.   <U<I/
  702.   {'“' 0x0a '”' 0x0a 'π' 0x21 '©' 0x21 '' 0x1e '–' 0x1e 'Ë' 0x29 '»' 0x29 'Ê' 0x27 'Δ' 0x27 'æ' 0x2a 'Æ' 0x2a}
  703. }
  704.  
  705. set "keyboards(Croatian)" {
  706.   {“1234567890/+‰∂ãçÏ<,.-}
  707.   {”!"#$%&'()=?*·≠âåÎ>;:_}
  708.   <U<I/‰
  709.   <U<I/∂
  710.   {'“' 0x0a '”' 0x0a '‰' 0x21 '·' 0x21 '∂' 0x1e '≠' 0x1e 'ã' 0x29 'â' 0x29 'ç' 0x27 'å' 0x27 'Ï' 0x2a 'Î' 0x2a}
  711. }
  712.  
  713. set "keyboards(Roman - JIS)" {
  714.   {§1234567890-^@[;:]`,./}
  715.   {±!"#$%&'()0=~`{+*}~<>?}
  716.  <U/[
  717.  <U/]
  718.  {'§' 0x0a '±' 0x0a}
  719. }
  720.  
  721.